#pragma once

#include <QWidget>

class QTimeView;
class QTimeModel;
class QPushButton;
class QTimeDelegate;
class QItemSelectionModel;
class QTimeWidget : public QWidget
{
    Q_OBJECT

public:
    explicit QTimeWidget(int colCnt, QWidget *parent = nullptr);
    ~QTimeWidget();

    void setMinValue(int value);
    void setMaxValue(int value);
    void setCurrentValue(int value);
    void setData(const QList<QString>& datas);

Q_SIGNALS:
    void valueChanged(int value);
    
private:
    QTimeView *_pView{ nullptr };
    QTimeModel *_pModel{ nullptr };
    QTimeDelegate *_pDelegate{ nullptr };
    QItemSelectionModel *_pSelectionModel{ nullptr };
};
